#!/bin/bash


### Class Bruter
# Generate chars and a string with all the posible options between 0 and 127 (ascii)

bruter_i=0;
bruter_length=0
bruter_lastword="";
bruter_lastletter=$bruter_i
bruter_lastsize="";

##Defines the length of the bruteforcer 
## and starts by 0
bruter_init() {
	bruter_length=$2
	for w in {{a..z},{0..9}}{{a..z},{0..9}} ;do
	 echo $w;
	done
	 
	bruter_i=0;
}

bruter_chr() {
      	printf \\$(printf '%03o' $1)
}

bruter_next() {
	bruter_i=$(($bruter_i+1));
	bruter_lastword=$bruter_word
	bruter_word=$bruter_lastword
}

bruter_show() {
	echo chr $bruter_i
}
